<div id="billing">
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <?php
    // REICH - 26.08.2010
    // Set when called from review, to handle output of certain buttons / divs
    $readonly   = $_SESSION['readonly'];
    $salutation = $_SESSION['billing_salutation'];
    $firstname  = $_SESSION['billing_firstname'];
    $lastname   = $_SESSION['billing_lastname'];
    $account    = $_SESSION['billing_account'];
    $street     = $_SESSION['billing_street'];
    $city       = $_SESSION['billing_city'];
    $zip        = $_SESSION['billing_zip'];
    $country    = $_SESSION['billing_country'];
    ?>
    <div class="billing_separator"></div>
    <div class="billing_header"><strong>Kundendaten</strong></div>
    <div class="billing_separator"></div>
    <form id="billing_form_submit" name="billing_form" action="/payments/" method="post" onSubmit="return validate(billing_form)">
        <div id="customdata">
            <label>Anrede:</label>
            <select id="salutation" tabindex="1" name="salutation" <?php if($readonly==true) echo 'disabled' ?>>
                <option <?php if($salutation=='Herr') echo 'selected' ?>>Herr</option>
                <option <?php if($salutation=='Frau') echo 'selected' ?>>Frau</option>
                <option <?php if($salutation=='Firma') echo 'selected' ?>>Firma</option>
            </select>
            <br />
            <label>Vorname:*</label>
            <input type="text" tabindex="2" value="<?php echo $firstname; ?>" name="firstname" <?php if($readonly==true) echo 'disabled' ?>/>
            <br />
            <label>Nachname:*</label>
            <input type="text" tabindex="3" value="<?php echo $lastname; ?>" name="lastname" <?php if($readonly==true) echo 'disabled' ?>/>
            <br />
            <label>Firma:</label>
            <input type="text" tabindex="4" value="<?php echo $account; ?>" name="account" <?php if($readonly==true) echo 'disabled' ?>/>
            <br />
            <br />
            <label>Straße:*</label>
            <input type="text" tabindex="5" value="<?php echo $street; ?>" name="street" <?php if($readonly==true) echo 'disabled' ?>/>
            <br />
            <label>Ort:*</label>
            <input type="text" tabindex="6" value="<?php echo $city; ?>" name="city" <?php if($readonly==true) echo 'disabled' ?>/>
            <br />
            <label>Postleitzahl:*</label>
            <input type="text" tabindex="7" value="<?php echo $zip; ?>" name="zip" size="10" <?php if($readonly==true) echo 'disabled' ?>/>
            <br />
            <label>Land:*</label>
            <select id="country" tabindex="8" name="country" <?php if($readonly==true) echo 'disabled' ?>>
                <option value="AT" <?php if($country=='AT') echo 'selected' ?>>Österreich</option>
                <option value="DE" <?php if($country=='DE') echo 'selected' ?>>Deutschland</option>
                <option value="CH" <?php if($country=='CH') echo 'selected' ?>>Schweiz</option>
            </select>
        </div>
        <?php if($readonly==false) { ?>
        <table cellpadding="0" cellspacing="0" border="0" width="930px">
            <tr><td colspan="4" style="font-size:0px; height:10px;"></td></tr>
            <tr>
                <td colspan="2"><a href="<?php echo $loc . 'basket/'; ?>"><img src="/images/spacer.gif" class="spritebg continueshop" /></a></td>

                <td colspan="2" style="text-align: right;">
                    <input type="image" src="/images/spacer.gif" class="spritebg checkout" />
                </td>
            </tr>
        </table>
        <?php } //readonly ?>
    </form>
</div>
<SCRIPT LANGUAGE="JavaScript">
<!--
function validate(frm) {
    if (frm.firstname.value.length == 0) {
        alert("Vorname ist ein Mußfeld!")
        frm.firstname.focus()
        return false
    }
    if (frm.lastname.value.length == 0) {
        alert("Nachname ist ein Mußfeld!")
        frm.lastname.focus()
        return false
    }
    if (frm.street.value.length == 0) {
        alert("Straße ist ein Mußfeld!")
        frm.street.focus()
        return false
    }
    if (frm.city.value.length == 0) {
        alert("Ort ist ein Mußfeld!")
        frm.city.focus()
        return false
    }
    if (frm.zip.value.length == 0) {
        alert("Postleitzahl ist ein Mußfeld!")
        frm.zip.focus()
        return false
    }
}
//-->
</SCRIPT>